import i18n from '@/lang'
import Vue from 'vue'
export const swPackageProdCols = [
  {
    title: i18n.t('ecuName'),
    dataIndex: 'ecuName',
    width: 200,
  },
  {
    title: i18n.t('softwareVersion'),
    width: 200,
    scopedSlots: { customRender: 'softwareVersion' }
  },
  {
    title: '软件包状态',
    dataIndex: 'softwareStatus',
    width: 200,
    scopedSlots: { customRender: 'softwareStatus' }
  },
  {
    title: '软件包进度',
    dataIndex: 'process',
    width: 200,
    scopedSlots: { customRender: 'process' }
  },
  {
    title: '软件包类型',
    dataIndex: 'softwareType',
    width: 200,
    customRender: (text, record, index) => {
      return Vue.$store.getters.getDictCodeObj('softwareMakeTypeDictCode')[text] || text;
    },
  },
  {
    title: i18n.t('operationTime'),
    dataIndex: 'createTime',
    width: 200,
    scopedSlots: { customRender: 'operationTime' },
    sorter: true
  },
  {
    title: i18n.t('remark'),
    dataIndex: 'remark',
    width: 200,
  },
  {
    title: i18n.t('operation'),
    dataIndex: 'action',
    width: 160,
    fixed: 'right',
    scopedSlots: { customRender: 'action' }
  }
]